<template>
	<view class="">
		<navbar title="服务详情" :back="true" color="#fff" leftIconColor="#fff"></navbar>
		
	    <view style="position: relative;">
	    	<mswiper :list="detail.slideImage" height="500rpx" :nextMargin="0" :previousMargin="0" :radius="0" />
	    	<view style="padding: 20rpx 0;border-radius: 30rpx 30rpx 0 0;position: absolute;left: 0;top: 474rpx;width: 100%;background-color: #fff;">
	    		 <view style="margin-top: 10rpx;color: #000;padding: 0 30rpx;display: flex;justify-content: space-between;align-items: center;">
	    				 <view class="">
							 <view style="font-weight: 700;;width: 100%;word-wrap:break-word;">{{detail.name}}</view>
							 <view style="font-size: 24rpx;color:#8995AD;margin: 24rpx 0;">
							      <view class="">添加时间 : {{detail.addTime}}</view>
							      <view style="font-size:24rpx;display: flex;align-items: center;">
							      	  <view class="">服务商名称:</view>
							      	  <view style="display: flex;align-items: center;margin-left: 20rpx;">
							      		  <image :src="detail.icon" mode="widthFix" style="width: 60rpx;display: block;margin-right: 10rpx;"></image>
							      		  <view class="">{{detail.serverName}}</view>
							      	  </view>
							      </view>
							 </view>
						 </view>
						 <button style="text-align: center;margin-right: 20rpx;" open-type="share">
						 	 <image src="https://cdn.yowswl.com/image/admin/2023/11/20/0fb5905209154d6cbef1602d786cdc1ez1encaj7hq.png" mode="" style="width:40rpx;height: 40rpx;display: inline-block;"></image>
						     <view style="color:#666;font-size: 22rpx;">分享</view>
						 </button>		
	    		</view>
				<view style="padding: 20rpx;border-radius: 20rpx;word-wrap:break-word;">
					<view style="text-align: center;margin-bottom: 20rpx;">
						<image src="https://cdn.yowswl.com/image/admin/2023/11/20/439d36d5d3794e3783106c8ffa4d29d0qn8a9tv72i.png" mode="widthFix" style="width:324rpx;display:inline-block;"></image>
					</view>
					<u--textarea v-model="detail.msg"  border='none' autoHeight  disabled maxlength='-1'></u--textarea>
				</view>
	    		 <view style="padding: 20rpx 20rpx 120rpx 20rpx;color: #000;margin-top: 20rpx;">
	    			<view style="text-align: center;margin-bottom: 20rpx;">
	    				<image src="https://cdn.yowswl.com/image/admin/2023/11/20/74c3e40f85ee434e956fe0b2860dccd2xza8fy1cmv.png" mode="widthFix" style="width:324rpx;display:inline-block;"></image>
	    			</view>
	    			 <view style="min-height: 200rpx;">
	    				<u-parse :content="detail.detail" :domain="domain" :lazyLoad="true"></u-parse>
	    			 </view>
	    		 </view>
	    	</view>
	    </view>
	    
	  
	    </view>
	   
	</view>
</template>

<script>
	import {
		getStoreDetail
	} from "@/api/store.js"
	import navbar from '@/components/baseNavbar.vue'
	import mswiper from '@/components/swiperList.vue'
	export default{
		components:{
			navbar,
			mswiper
		},
		data(){
			return{
				detail:{},
				id:''
			}
		},
		onLoad(option){
			if(option.id){
				this.id = option.id
				getStoreDetail({id:option.id}).then(res=>{
					this.detail = res.data
					console.log('121',this.detail);
				})
			}
		},
		onShareAppMessage(res) {
			if (res.from === 'button') {// 来自页面内分享按钮
			      console.log(res.target)
			}
			return {
				title: this.detail.name,
				path: 'pages/sub/store/serdet?id=' + this.id,
				desc: this.detail.msg
			}
		},
		onShareTimeline() {
			return {
				title: this.detail.name,
				path: 'pages/sub/store/serdet?id=' + this.id,
				desc: this.detail.msg
			}
		},
	}
</script>

<style lang="scss"> 
	/deep/.u-textarea--disabled{
		background-color: #fff !important;
	}
</style>
<style lang="scss" scoped>
	button {
		height: 80rpx; //支付宝需要加
		padding-right: 0;
		padding-left: 0;
		margin-right: 0;
		margin-left: 0;
		font-size: 28rpx;
		line-height: 1;
		color: #1c1c1c;
		background: none;
		border: none; //支付宝需要加
	}
	
	.button-hover {
		color: #1c1c1c;
		background: none;
	}
	/* 按钮去掉边框 */
	button::after {
		border: none;
	}
</style>